package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.Catelog2Vo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author liuShiYu
 * @email 2426237645@qq.com
 * @date 2025-03-12 19:07:21
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void deleteBatchIds(List<Long> asList);

    /**
     * 寻找当前目录的全部路径
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(long catelogId);

    /**
     * 级联跟新分类****
     * @param categoryEntity
     */
    void updateCascade(CategoryEntity categoryEntity);


    /**
     * 获取一级分类****
     * @return
     */
    List<CategoryEntity> getLevel1Categorys();

    /**
     * 获取分类的json格式数据****
     * @return
     */
    Map<String,List<Catelog2Vo>> getCatalogJson();
}

